<script setup>
import add from "./add.vue"
import MyDealStatusHandle from "@/views/scrm/component/action/MyDealStatusHandle.vue";

const emits = defineEmits(['rowSave', 'rowUpdate', 'rowView', 'rowDel', "onImport", 'onExport'])

const props = defineProps({
  permission: {
    type: Object
  }
})

</script>

<template>
  <div>
    <el-button type="primary" v-if="permission.addBtn" @click="$emit('rowSave')">新增</el-button>
    <el-button type="success" v-if="permission.editBtn" @click="$emit('rowUpdate')">编辑</el-button>
    <el-button type="success" v-if="permission.viewBtn" @click="$emit('rowView')">查看</el-button>
    <el-button type="danger" v-if="permission.delBtn" @click="$emit('rowDel')">删除</el-button>
    <el-button type="success" v-if="permission.importBtn" @click="$emit('onImport')">导入</el-button>
    <el-button type="success" v-if="permission.exportBtn" @click="$emit('onExport')">导出</el-button>
    <slot name="menu-left"></slot>
    <!--刷新-->
    <el-icon color="#409EFC" :size="20">
      <Refresh/>
    </el-icon>
    <!--列显示影藏操作-->
    <el-icon color="#409EFC" :size="20">
      <Operation/>
    </el-icon>
    <slot name="menu-right"></slot>
  </div>

</template>

<style scoped lang="scss">

</style>